package entity;

public class Covid {

    private String region;
    private int definite;

    public Covid(String region, int definite) {
        this.region = region;
        this.definite = definite;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public int getDefinite() {
        return definite;
    }

    public void setDefinite(int definite) {
        this.definite = definite;
    }

    public int checkGrade() {
        int grade;
        if (this.definite < 50) {
            grade = 7;
        } else if (this.definite < 200) {
            grade = 6;
        } else if (this.definite < 500) {
            grade = 5;
        } else if (this.definite < 800) {
            grade = 4;
        } else if (this.definite < 1300) {
            grade = 3;
        } else if (this.definite < 2000) {
            grade = 2;
        } else {
            grade = 1;
        }
        return grade;
    }

}
